package cn.wolfcode.service.impl;

import cn.wolfcode.mapper.ConsumptionReportMapper;
import cn.wolfcode.qo.QueryObject;
import cn.wolfcode.service.IConsumptionReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * @Author chenhui
 * @Date 2021/1/17 10:43
 **/
@Service
public class ConsumptionReportServiceImpl implements IConsumptionReportService {

    @Autowired
    private ConsumptionReportMapper consumptionReportMapper;

    @Override
    public PageInfo<HashMap<String,Object>> query(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<HashMap<String,Object>> list = consumptionReportMapper.selectConsumptionReport(qo);
        return new PageInfo<>(list);
    }


}
